<%@ page import="com.dingpeikeji.quickdeer.core.modules.sys.entity.Office" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="FLAT_TYPE_ENTERPRISE" value="<%=Office.FLAT_TYPE_ENTERPRISE %>" />
<html>
<head>
	<title>到账登记管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/rentproduct/officeSave/">到账登记列表</a></li>
		<shiro:hasPermission name="rentproduct:officeSave:edit"><li><a href="${ctx}/rentproduct/officeSave/form">到账登记添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="officeSave" action="${ctx}/rentproduct/officeSave/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<div>
			<label>公司：</label>
				<sys:treeselect id="office" name="office.id" value="${officeSave.office.id}" labelName="office.name" labelValue="${officeSave.office.name}"
					title="部门" url="/sys/office/treeData?type=2&flatType=${FLAT_TYPE_ENTERPRISE }" cssClass="input-small" allowClear="true" notAllowSelectParent="true"/>
			<label>日期范围</label>
			<input name="billdateStart" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
				value="${officeSave.billdateStart }" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			至
			<input name="billdateEnd" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
				value="${officeSave.billdateEnd }" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
		</div>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>公司</th>
				<th>到账日期</th>
				<th>到账金额</th>
				<shiro:hasPermission name="rentproduct:officeSave:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="officeSave">
			<tr>
				<td><a href="${ctx}/rentproduct/officeSave/form?reserveid=${officeSave.reserveid}">
					${officeSave.office.name}
				</a></td>
				<td>
					<fmt:formatDate value="${officeSave.billdate}" pattern="yyyy-MM-dd"/>
				</td>
				<td>
					￥${officeSave.amount}
				</td>
				<shiro:hasPermission name="rentproduct:officeSave:edit"><td>
    				<a href="${ctx}/rentproduct/officeSave/form?reserveid=${officeSave.reserveid}">修改</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>